package cn.net.ecode.tools.ecodeplatformmaker;

import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;

import cn.net.ecode.tools.ecodeplatformmaker.action.ConnAddAction;
import cn.net.ecode.tools.ecodeplatformmaker.action.ConnEditAction;

public class ApplicationActionBarAdvisor extends ActionBarAdvisor {

	ConnAddAction connAddAction;
	ConnEditAction connEditAction;
	
    public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
        super(configurer);
    }

    protected void makeActions(IWorkbenchWindow window) {
    	connAddAction = new ConnAddAction(window);
    	connEditAction = new ConnEditAction(window);
    	
    }

    protected void fillMenuBar(IMenuManager menuBar) {
    	super.fillMenuBar(menuBar);
    	MenuManager demoMenu = new MenuManager("数据库连接","");
    	menuBar.add(demoMenu);
    	demoMenu.add(connAddAction);
    	demoMenu.add(connEditAction);
    	
    }
    
}
